<template>
	<div class="toNav">
		<div class="tonav">
			<div class="van" v-for="(v, index) in arr" :key="index">
				<div class="grid">
					<img :src="v.img" alt="">
					<div>{{ v.text }}</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
export default {
	data() {
		return {
			arr: [
				// {
				// 	img: "//gw.alicdn.com/imgextra/i4/O1CN01XCiY1B1px9ivHkDGm_!!6000000005426-2-tps-183-144.png_q90.jpg_.webp", text: "天猫新品"
				// },
				// {
				// 	img: "//gw.alicdn.com/imgextra/i3/O1CN01FgQFp81spmBXqQMtA_!!6000000005816-2-tps-183-144.png_q90.jpg_.webp", text: "今日爆款"
				// },
				// {
				// 	img: "//gw.alicdn.com/imgextra/i1/O1CN01tsk5OY1q0MUo5PJga_!!6000000005433-2-tps-183-144.png_q90.jpg_.webp", text: "天猫国际"
				// },
				// {
				// 	img: "//gw.alicdn.com/imgextra/i2/O1CN01yK3Cxn1sTnAx1fOjq_!!6000000005768-2-tps-183-144.png_q90.jpg_.webp", text: "飞猪旅行"
				// },
				// {
				// 	img: "///gw.alicdn.com/imgextra/i1/O1CN01iZIGkz1URSOUdRHqS_!!6000000002514-2-tps-183-144.png_q90.jpg_.webp", text: "天猫超市"
				// },
				// {
				// 	img: "//gw.alicdn.com/imgextra/i1/O1CN018Ilnep1Qt9ryh1Vue_!!6000000002033-2-tps-183-144.png_q90.jpg_.webp", text: "淘宝吃货"
				// },
				// {
				// 	img: "//gw.alicdn.com/imgextra/i2/O1CN01gUIFrA1OuPj70aTIW_!!6000000001765-2-tps-183-144.png_q90.jpg_.webp", text: "省钱卡"
				// },
				// {
				// 	img: "//gw.alicdn.com/imgextra/i3/O1CN013WcsZW1jfr4AXnmVl_!!6000000004576-2-tps-183-144.png_q90.jpg_.webp", text: "领淘金币"
				// },
				// {
				// 	img: "//gw.alicdn.com/imgextra/i2/O1CN01ZOR1cv1yjGFORGh1V_!!6000000006614-2-tps-183-144.png_q90.jpg_.webp", text: "阿里拍卖"
				// },
				// {
				// 	img: "//gw.alicdn.com/tfs/TB1WgOmesieb18jSZFvXXaI3FXa-183-144.png_q90.jpg_.webp?getAvatar=1", text: "分类"
				// },
			]
		}
	},
	async created() {
		this.$http({
			url: '  http://localhost:3000/syjhs',
			method: "get"
		}).then(res => {
			this.arr = res.data

		})
	}
}
</script>

<style scoped>
.toNav {
	background-color: #f4f4f4;
	box-sizing: border-box;
	height: 3.28rem;
	border-top: 1px solid transparent;
}

.tonav {
	width: 7.1rem;
	height: 3rem;
	background-color: white;
	margin-left: .2rem;
	margin-top: .1rem;
	box-sizing: border-box;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	text-align: center;
	font-size: 14px;
	border-radius: .3rem;
}

.van {
	width: 1.26rem;
	height: 1.32rem;
}

.grid {
	height: 1.32rem;
}

::v-deep .van-grid-item__content {
	width: 1.4rem;
}

img {
	width: 100%;
}
</style>